home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / BORLAND TURBO / SCRPTEXM.PAK / VIEWLOCS.SPP < prev   
Text File  |  1997-05-06  |  816b  |  37 lines

  1. //--------------------------------------------------------------------------
  2. // Object Scripting
  3. // Copyright (c) 1996, 1997 by Borland International, All Rights Reserved
  4. //
  5. // VIEWLOCS.SPP: View Locals. Inspects local variables if the debugger has
  6. //   a process.
  7. //
  8. // USE: Run script.
  9. //
  10. // FILES: MSG.SPP
  11. //--------------------------------------------------------------------------
  12. print typeid(module());
  13.  
  14. //
  15. // IDE imports.
  16. //
  17. import scriptEngine;
  18. import debugger;
  19.  
  20. //
  21. // Load support module(s).
  22. //
  23. if (!scriptEngine.IsLoaded("msg")) scriptEngine.Load("msg");
  24.  
  25. viewlocs()
  26. {
  27.   declare msg = new TMsg();
  28.  
  29.   if (debugger.HasProcess) {  // Process is under debugger.
  30.     debugger.Inspect("$Locals", NULL, 1, 1);
  31.   }
  32.   else {
  33.     msg.Info("There is no process running.");
  34.   }
  35. }
  36.  
  37.